package com.neuedu.web.controller;

import com.neuedu.web.common.BaseMethodController;
import com.neuedu.web.common.PageInfo;
import com.neuedu.web.po.CheckitemPO;
import com.neuedu.web.po.RegisterPO;
import com.neuedu.web.service.CheckItemService;
import com.neuedu.web.service.YijiService;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

/**
 * @author 金山
 * 项目：his
 * site: https://blog.fulfill.com.cn
 * 描述  Dept接口
 * @data 2024-11-21 14:21:592
 */
@WebServlet(urlPatterns = "/yiji/*")
public class YijiController extends BaseMethodController {
    YijiService yijiService = new YijiService();

    public PageInfo<RegisterPO> registPage(HttpServletRequest request , HttpServletResponse response) throws IOException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return yijiService.registPage(request,response);
    }


    /**
     * 查询患者开立检查详情
     * @param request
     * @param response
     * @return
     * @throws IOException
     * @throws NoSuchFieldException
     * @throws InvocationTargetException
     * @throws NoSuchMethodException
     * @throws InstantiationException
     * @throws IllegalAccessException
     */
    public Map queryRegistCheckDetail(HttpServletRequest request , HttpServletResponse response) throws IOException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return yijiService.queryRegistCheckDetail(request,response);
    }


    /**
     * 保存检查结果
     * @param request
     * @param response
     * @return
     * @throws IOException
     * @throws NoSuchFieldException
     * @throws InvocationTargetException
     * @throws NoSuchMethodException
     * @throws InstantiationException
     * @throws IllegalAccessException
     */
    public boolean saveCheckResult(HttpServletRequest request , HttpServletResponse response) throws IOException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return yijiService.saveCheckResult(request,response);
    }


    /**
     * 已执行的检查结果页面，查看详情
     * @param request
     * @param response
     * @return
     * @throws NoSuchFieldException
     * @throws InvocationTargetException
     * @throws NoSuchMethodException
     * @throws InstantiationException
     * @throws IllegalAccessException
     */
    public Map queryCheckResult(HttpServletRequest request, HttpServletResponse response) throws NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return yijiService.queryCheckResult(request,response);
    }

}
